@{
    Layout = null;

}
@using System.Security

<script src="~/Scripts/js/TopNav_koViewModel.js"></script>
<script>
    var tnVM = new TopNavViewModel();
    ko.applyBindings(tnVM);
</script>
<nav class="nav-collapse collapse">
    <ul class="topnav nav pull-right">
        <li><a href="./">Home</a></li>       
            @*<a href="#" class="dropdown-toggle" data-toggle="dropdown">Login <b class="logincaret caret"></b></a>*@
            @*<ul class="login-pop dropdown-menu">
                <li>
                    <form class="nomargin myform">
                        <input class="span3" type="text" placeholder="User Name">
                        <input class="span3" type="password" placeholder="Password">
                        <button type="submit" class="submit-btn btn pull-right">SUBMIT</button>
                    </form>
                </li>
            </ul>*@
        @if (Request.IsAuthenticated)
        {
            
            <li><a href="/" data-bind="click: TopNavApplication">Applications</a></li>
            //if (Roles.IsUserInRole(Membership.GetUser().UserName, "super admin"))
            {
                <li><a href="/" data-bind="click: TopNavCreateRole">Roles</a></li>
                <li><a href="/" data-bind="click: TopNavUser">Users</a></li>
                <li><a href="/" data-bind="click: TopNavAppUsers">Asign User<span class="sub-tital">to Applications</span></a></li>
                <li><a href="/" data-bind="click: TopNavRoles">Asign User<span class="sub-tital">to Roles</span></a></li>
            <li><a href="/" data-bind="click: TopNavLogging">Logging<span class="sub-tital"></span></a></li>
            <li><a href="/" data-bind="click: TopNavLogcategory">Log<span class="sub-tital">Category</span></a></li>
            }
            <li><a href="/" id="logout" data-bind="click: TopNavLogout">Logout<span class="sub-tital">@(Membership.GetUser().UserName)</span></a></li>
        }
        else
        {
            <li><a href="/" data-bind="click: TopNavRegisters">Register<span class="sub-tital">for account</span></a></li>
            <li class="dropdown"><a href="/" id="login" data-bind="click: TopNavLogin">Login</a></li>
         }
        @*@Html.Partial("_LogonPartial")*@
    </ul>
</nav>


